﻿using Hotel.Application.Dics.Dto;
using Hotel.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hotel.Application.Dics
{
    public interface IDicService : IBaseService<Dic, DicCreateUpdateDto, DicListDto>
    {
        /// <summary>
        /// 判断是否存在字典项
        /// </summary>
        /// <param name="UserName"></param>
        /// <returns></returns>
        Task<ResultDto<bool>> CheckName(DicCreateUpdateDto dto);
        /// <summary>
        /// 根据条件查缓存项
        /// </summary>
        /// <param name="expression"></param>
        /// <returns></returns>
        Task<List<DicListDto>> QueryByCacheAsync(Func<DicListDto, bool> expression);
        /// <summary>
        /// 根据条件查缓存项
        /// </summary>
        /// <param name="MenuType"></param>
        /// <returns></returns>
        Task<List<DicListDto>> QueryByCacheAsync(string TypeCode);
    }
}
